<?php

class Regex
{
    public static function containsOnlyCharacter($texte)
    {
        return preg_match('#^[a-zA-ZÀ-ÿ\s\'-]{1,29}$#', $texte);
    }
    
    public static function containsNotAnyNumber($texte)
    {
        return preg_match('#[^0-9]+#', $texte);
    }
    
    public static function containsMail($texte)
    {
        return preg_match('#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,6}$#', $texte);
    }
}
